<template>
  <div style="text-align: center; margin-top: 200px">
    <div>
      <h3 style="color: #42b983">开始自定义做题之旅吧！</h3>
      <br>
      <el-input
        placeholder="请输入范围"
        v-model="input"
        style="width: 150px;"
        clearable>
      </el-input>
    </div>
    <div style="margin-top: 20px;">
      <el-radio v-model="radio" label="1" border>加减法</el-radio>
      <el-radio v-model="radio" label="2" border>乘除法</el-radio>
    </div>
    <br>
    <el-button style="margin-top: 15px;" @click="select" size="mini">确定</el-button>
  </div>
</template>

<script>
export default {
  name: "selectScale",
  components:{

  },
  data() {
    return {
      input: '',
      radio: '',
    }
  },
  methods: {
    select() {
      let p = this.input
      if(this.getValue() == 1)
        this.$router.push({
          name: 'selectExercise1',
          params: {
            index: p
          }
        })
      else
        this.$router.push({
          name: 'selectExercise2',
          params: {
            index: p
          }
        })
    },
    getValue(){
      return this.radio
    }
  }
}
</script>

<style lang="css">
</style>
